<html>
<head>
<title>==Mu Duel==  [Guilds Ranking]</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style3 {font-size: 11px}
.style4 {color: #333333}
.style5 {font-size: 11px; color: #333333; }
.style21 {	font-size: 11px;
	color: #000000;
	font-family: Arial, Helvetica, sans-serif;
}
-->
</style>
</head>
<?PHP 
include("config.php");
 ?>
 <?PHP include("config.php");
require_once "sql_inject.php"; 
$bDestroy_session = TRUE; 
$url_redirect = 'index.php'; 
$sqlinject = new sql_inject('./log_file_sql.log',$bDestroy_session,$url_redirect)  ; 
require 'config.php';
?>
<script language="JavaScript">
 function blockError(){return true;}
 window.onerror = blockError;
 </script>
<script language=JavaScript>
 function disableselect(e) {
    return false
 } 
 function reEnable() {
    return true
 }
 //if IE4+
 document.onselectstart=new Function ("return false")
 //if NS6
 if (window.sidebar) { 
    document.onmousedown=disableselect
    document.onclick=reEnable
 }
 </script>
<SCRIPT language=JavaScript>
<!--

var message="All rights Reserved Multplay Page";


function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// --> 
</SCRIPT>
<body bgcolor="#000000">
<?
$query = 'SELECT TOP 300 * from guild order by G_score desc';
$result = mssql_query($query);
?>
<div align="center"><br>
    <table width="535" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="56"><br>          <table width="351" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="68" height="100"><div align="center"><font color="#990000" size="5"><img src="img/16.jpg" width="68" height="100"></font></div>
            </td>
            <td width="215" background="img/15.JPG"><div align="center"><strong><font color="#FFFFFF" size="5">Ranking
                    de Guilds</font></strong></div>
            </td>
            <td width="68"><div align="center"><img src="img/17.JPG" width="68" height="100"></div>
            </td>
          </tr>
        </table></td>
      </tr>
  </table>
    <span class="style21"></span>
</div>
<center><table width="400" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
          <!--DWLayoutTable-->
          <tr>
            <td height="14" colspan="10" valign="top"><div align="center" class="style3 style4"><strong><font color="#FFFFFF"><br>
            Top 300<br>
              <br>
            </font></strong></div></td>
          </tr>
          <!--DWLayoutTable-->
                      <tr><td width="17" height="21" valign="top" background="img/anuncio.JPG"><div align="center" class="style5"><strong><font color="#FFFFFF">Nš</font></strong></div>
                          </td>
                        <td width="38" valign="top" background="img/anuncio.JPG"><div align="center" class="style5"><strong><font color="#FFFFFF">Nome</font></strong></div>
                        </td>
                        <td width="40" valign="top" background="img/anuncio.JPG"><div align="center" class="style5"><strong><font color="#FFFFFF">Score</font></strong></div>
                        </td>
				        <td width="40" valign="top" background="img/anuncio.JPG"><div align="center" class="style5"><strong><font color="#FFFFFF">Master</font></strong></div>
                        </td>
						<td width="40" valign="top" background="img/anuncio.JPG"><div align="center" class="style5"><strong><font color="#FFFFFF">Members</font></strong></div>
                        </td>
						<td width="40" valign="top" background="img/anuncio.JPG"><div align="center" class="style5"><strong><font color="#FFFFFF">Logo</font></strong></div>
                        </td>
                      </tr>
                      <?		
for($i=0;$i < mssql_num_rows($result);++$i)
{
$row = mssql_fetch_row($result);
$rank = $i+1;
$query2= "Select count(*) from GuildMember where G_name='$row[0]'";
$result2 = mssql_query($query2);
$row2 = mssql_fetch_row($result2);
$logo = urlencode(bin2hex($row[1]));
   echo "<tr> 
<td valign=top align=center><span class='style1'>$rank.</td>
<td valign=top align=center><span class='style1'>$row[0]</td>
<td valign=top align=center><span class='style1'>$row[2]</td>
<td valign=top align=center><span class='style1'>$row[3]</td>
<td valign=top align=center><span class='style1'>$row2[0]</td>
<td valign=top align=center><img src='decode.php?decode=$logo' height=40 width=40></td>
              </tr>";
			}
		?>
</table>
  <br>
  <strong><a href="rankings.php" target="menu"><font color="#CCCCCC">&lt;&lt;Voltar </font> </a></strong></center>
</body>
</html>
